<section class="content-header">
  <!-- <h1>
        税表预警
    </h1> -->
  <ol class="breadcrumb">
    <li><a ui-sref="dashboard"><i class="fa fa-dashboard"></i>我的面板</a></li>
    <li><a class="active">税表预警</a></li>
  </ol>
</section>
<section class="content">
  <div class="box box-danger">
    <div class="box-header with-border">
      <h3 class="box-title">查询条件</h3>
      <div class="box-tools">
        <div class="box-tools pull-right">
          <button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i>
          </button>
        </div>
      </div>
    </div>
    <div class="box-body">
      <div class="row">
        <div class="col-md-3">
          <div class="form-group">
            <input type="text" class="form-control" name="name" ng-model="search.name" placeholder="关键字(档案号、订单名称)">
          </div>
        </div>
        <div class="col-md-3">
          <div class="form-group">
            <select class="form-control" ng-model="search.month">
              <option value="">成立月份</option>
              <option value="1">1</option>
              <option value="2">2</option>
              <option value="3">3</option>
              <option value="4">4</option>
              <option value="5">5</option>
              <option value="6">6</option>
              <option value="7">7</option>
              <option value="8">8</option>
              <option value="9">9</option>
              <option value="10">10</option>
              <option value="11">11</option>
              <option value="12">12</option>
            </select>
          </div>
        </div>
        <div class="col-md-2">
          <div class="form-group">
            <select class="form-control" ng-model="search.tax_type">
              <option value="">所有类型</option>
              <option value="0">未知</option>
              <option value="1">零申报</option>
              <option value="2">转审计</option>
            </select>
          </div>
        </div>
        <div class="col-md-3">
          <a class="btn btn-sm btn-info btn-flat" ng-click="query()">查询</a>
        </div>
      </div>
    </div>
  </div>
  <div class="box box-danger" style="margin-bottom: 110px;">
    <div class="box-body table-responsive no-padding">
      <table class="table table-hover">
        <tbody>
          <tr>
            <th style="width: 10px">#</th>
            <th style="width: 100px">档案号</th>
            <th style="width: 150px">税表发出日期</th>
            <th style="width: 150px">税表截止日期</th>
            <th style="max-width: 100px">中文名称</th>
            <th style="max-width: 100px">英文名称</th>
            <th style="width: 100px">业务员</th>
            <th style="width: 100px">订单所有人</th>
            <th style="max-width: 100px">上次处理方式</th>
            <th style="max-width: 100px">账期</th>
            <th style="width: 100px">证书日期</th>
            <th style="width: 100px">距证书时间</th>
            <th class="opt-col" style="width: 100px">操作</th>
          </tr>
          <tr ng-repeat="item in data.items">
            <td ng-bind="(($index + 1)+((data.page.current_index-1)*50))+'.'"></td>
            <td ng-bind="item.code"></td>
            <td>
              <span ng-bind="formatSentDate(item.sent_date, item.end_date, 'YYYY-MM-DD')"></span>
              <a href="javascript:;" ng-if="opers.indexOf(7) > -1 && item.sent_date == null" ng-click="sendDate(item)">填写</a>
            </td>
            <td ng-bind="format(item.end_date, 'YYYY-MM-DD')">
            <td ng-bind="item.name_cn" ng-attr-title="{{item.name_cn}}"></td>
            <td ng-bind="item.name_en" ng-attr-title="{{item.name_en}}"></td>
            <td ng-bind="item.salesman"></td>
            <td ng-bind="item.owner"></td>
            <td ng-bind="item.deal_way_name"></td>
            <td ng-bind="item.period" ng-attr-title="{{item.period}}"></td>
            <td ng-bind="format(item.date_setup, 'YYYY-MM-DD')"></td>
            <td ng-bind="item.diff_date"></td>
            <td class="opt-col">
              <div class="btn-group" >
                <button type="button" class="btn btn-box-tool dropdown-toggle" data-toggle="dropdown">
                  <i class="fa fa-wrench"></i>
                </button>
                <ul class="dropdown-menu" role="menu">
                  <li ng-if="item.tax_record_id != null">
                    <a href="javascript:;" ng-click="toAudit(item)">转审计</a>
                  </li>
                  <li ng-if="item.tax_record_id != null">
                    <a href="javascript:;" ng-click="noAudit(item)">零申报</a>
                  </li>
                  <li>
                      <a href="javascript:;" ui-sref="tax_list({orderId: item.id})">税表记录</a>
                  </li>
                </ul>
              </div>
            </td>
          </tr>
        </tbody>
      </table>
    </div>
    <div class="box-footer clearfix">
      <div pagination page-data="data.page" page-click="go(idx)"></div>
    </div>
  </div>
</section>
<div ui-view="modal"></div>
<div ui-view="attachment"></div>
